#include "Event.h"

Event::Event(sensors_names::ordinal sensor, double data)
{
	m_sensor = sensor;
	m_data = data;
}

Event::Event(const Event& source_event)
{
	m_sensor =	source_event.m_sensor;
	m_data =	source_event.m_data;
}

Event& Event::operator= (const Event& other)
{
    if (this != &other) // protect against invalid self-assignment
    {           
    	m_sensor	=	other.m_sensor;
		m_data	=	other.m_data;
    }

    // by convention, always return *this
    return *this;
}

bool Event::operator== (const Event& other) const {
	return this->m_sensor == other.m_sensor;
}
